import {request} from '/util/request.js'; // 假设你有统一的请求封装

const token = uni.getStorageSync('token');


export function list (sign) {
	return request.post('/sign/list', sign)
}

export function signAdd(sign) {
  return request.post('/sign/add', sign)
};

export function update (sign) {
	return request.post('/sign/update', sign)
}

export function userTraining (userId) {
	return request.get('/sign/userTraining', { userId })
}

export function userList (userId, type) {
	// 修正参数传递方式
	return request.get('/sign/userList', { userId, type })
}

// 重命名 export 函数，避免与 JavaScript 保留字冲突
export function exportSign (sign, response) {
	return request.post('/sign/export', { sign, response }, {
		responseType: 'blob'
	})
}